nv_l40_sources = files(
  'nv_l40_abi.cpp',
  'nv_l40_card.cpp', 
  'nv_l40_gpu.cpp',
  'nv_l40_memory.cpp',
) + interface_sources

libnv_l40 = shared_library(
  'nv_l40',
  nv_l40_sources,
  include_directories: include_dirs + nvidia_interface_inc,
  dependencies: [dev_deps, libsmbus_dep],
  name_prefix: 'lib',
  name_suffix: 'so', 
  install: true,
  install_dir: drivers_install_dir,
)

if build_tests and meson_build
  custom_target(
    'copy_libnv_l40',
    output: 'copy_libnv_l40',
    command: ['cp', libnv_l40.full_path(), drivers_install_dir],
    depends: libnv_l40,
    build_by_default: true,
  )
endif